import os

HISTORY_LEN = 3
TOPK_CONFLUENCE = 5
TOPK_JIRA = 3
TOPK_OPENAPI = 1

IS_REBUILD = False
CONFLUENCE_PAGEIDS = ["218536867","190108392","185890288","190108364"]
JIRA_PROJECTS = ['CFD']
SWAGGER_URL = 'https://stage-s-data-business-openapi-internet.patsnap.info/business-openapi/v2/api-docs'

# confluence
CONFLUENCE_URL = os.getenv('CONFLUENCE_URL', 'https://confluence.zhihuiya.com')
CONFLUENCE_TOKEN = os.getenv('CONFLUENCE_TOKEN')
JQL_TEMPLATE = 'project = "{project}" AND status = "In Progress" ORDER BY key DESC'

# jira
JIRA_URL = os.getenv('JIRA_URL', 'https://patsnap.atlassian.net')
JIRA_USERNAME = os.getenv('JIRA_USERNAME')
JIRA_TOKEN = os.getenv('JIRA_TOKEN')
JIRA_BATCH = 100

# embedding
USE_LOCAL_EMBEDDING = False
LOCAL_DEVICE = 'cuda'
EMBEDDING_MODEL = os.getenv('EMBEDDING_MODEL_CN', 'maidalun/bce-embedding-base_v1')
EMBEDDING_API_URL = os.getenv('EMBEDDING_API_URL', 'http://192.168.18.217:7748/compute/sem_embed_serv/spec')

# LLM
PATSNAP_API_KEY = os.getenv('PATSNAP_API_KEY')
PATSNAP_API_URL = "http://rd-gateway.patsnap.io/v1"

OPENAI_MODAL_NAME = "gpt-4o-2024-11-20"
OPENAI_MODEL_HEADERS = {"X-Ai-Engine": "openai"}
DEEPSEEK_MODAL_NAME = "deepseek-v3"
DEEPSEEK_MODEL_HEADERS = {"X-Ai-Engine": "deepseek"}
CLAUDE_MODAL_NAME = "claude-3.5-sonnet-20240620"
CLAUDE_MODEL_HEADERS = {"X-Ai-Engine": "anthropic"}
GEMINI_MODAL_NAME = "gemini-1.5-pro"
GEMINI_MODEL_HEADERS = {"X-Ai-Engine": "google"}

# Milvus
MILVUS_URI = 'http://1.95.61.58:19530'
MILVUS_TOKEN = ''
MILVUS_DB = 'patsnap'